From f6650b9309b5c31873b2b683ea4803d675cdc7b8 Mon Sep 17 00:00:00 2001 From: Jimi Xenidis Date: Thu, 24 Aug 2006 21:07:46 -0400 Subject: [PATCH] [POWERPC] detect how to call nm for xen-syms.S Signed-off-by: Jimi Xenidis Signed-off-by: Hollis Blanchard --- xen/arch/powerpc/Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/xen/arch/powerpc/Makefile b/xen/arch/powerpc/Makefile index 0a338a96dd..c37a307f1c 100644 --- a/xen/arch/powerpc/Makefile +++ b/xen/arch/powerpc/Makefile @@ -101,8 +101,15 @@ TARGET_OPTS += start.o $(ALL_OBJS) .xen-syms: start.o $(ALL_OBJS) xen.lds $(CC) $(CFLAGS) $(TARGET_OPTS) -o $@ +NM=$(CROSS_COMPILE)nm +new_nm := $(shell if $(NM) --help 2>&1 | grep -- '--synthetic' > /dev/null; then echo y; else echo n; fi) + +ifeq ($(new_nm),y) +NM := $(NM) --synthetic +endif + xen-syms.S: .xen-syms - $(CROSS_COMPILE)nm --synthetic -n $^ | $(BASEDIR)/tools/symbols > $@ + $(NM) -n $^ | $(BASEDIR)/tools/symbols > $@ xen-syms.o: xen-syms.S $(CC) $(CFLAGS) -D__ASSEMBLY__ -c $< -o $@ -- 2.30.2